package com.lzhsite.leetcode.algoritom.practise.arrays;

public class LeetCode001两数之和 {

	private int[] getTowSum(int arr[], int target) {

		int j = 0, k = arr.length - 1;
		while (k - j > 1) {
			if (arr[j] + arr[k] > target) {
				j--;
			} else if (arr[j] + arr[k] < target) {
				k++;
			} else {
				int[] arrs = { arr[j], arr[k] };
				return arrs;
			}

		}
		return null;
	}
}
